package com.lmt.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Zuul请求重试Controller
 * Date 2018/07/22
 *
 * @author MT-Lin
 */
@RestController
public class ZuulRetryController {

    private Logger logger = LoggerFactory.getLogger(ZuulRetryController.class);

    @RequestMapping("/zuulRetry")
    public String zuulRetry(@RequestParam(name = "retryMark") String retryMark){
        logger.warn("gateway-zuul-retry->zuulRetry():retryMark is {}", retryMark);
        try {
            Thread.sleep(1000000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "your retryMark is " + retryMark;
    }
}
